package com.pig4cloud.pig.ds.biz_a.service;

import cn.hutool.core.util.IdUtil;
import com.pig4cloud.pig.common.biz.design.AbstractChainContext;
import com.pig4cloud.pig.common.biz.domain.biza.req.ACreateCommand;
import com.pig4cloud.pig.common.biz.domain.biza.resp.ACreateBizRespDTO;
import com.pig4cloud.pig.common.core.constant.AllBizConstants;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @Description : TODO
 * @author: lingnan
 * @date: 2023/6/19
 * @version: 1.0
 */
@Service
@RequiredArgsConstructor
public class BizAServiceImpl implements BizAService {

	private final AbstractChainContext<ACreateCommand> abstractChainContext;

	/**
	 * 创建a
	 *
	 * @param param
	 * @return
	 */
	@Override
	public ACreateBizRespDTO createA(ACreateCommand param) {
		abstractChainContext.handler(AllBizConstants.BIZ_A, param);
		return ACreateBizRespDTO.builder().bizId(IdUtil.fastUUID()).build();
	}
}
